ReadAddAndLoop.asm
Language: 8080 Assembly
Last Modified: 2022-11-13 1:21:06 AM UTC
File Size: 1019 bytes
Last Modified: 2022-11-13 1:21:06 AM UTC
File Size: 1019 bytes
http://www.penguinstew.ca/example/AltairAdder/ReadAddAndLoop.asm
; Read Add and Loop Program, displays result of adding low and high value from switches using address lights
ORG 0000H
IN FFH ; 0000: DB FF Read value from switches
MOV B, A ; 0002: 47 Store value
ANI 0FH ; 0003: E6 0F Clear high part
MOV C, A ; 0005: 4F Store low part
MOV A, B ; 0006: 78 Load value
RRC ; 0007: 0F Rotate high to low
RRC ; 0008: 0F
RRC ; 0009: 0F
RRC ; 000A: 0F
ANI 0FH ; 000B: E6 0F Clear high part
ADD C ; 000D: 81 Add High to low
MOV D, A ; 000E: 57 Move to High address register
LP: LDAX D ; 000F: 1A Load (display) address
JMP LP ; 0010: C3 0F 00 Jump to display
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16